# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=pappy-proxy
pkgver=77.e1bb049
pkgrel=4
groups=('blackarch' 'blackarch-webapp' 'blackarch-proxy' 'blackarch-scanner'
        'blackarch-fuzzer' 'blackarch-recon')
pkgdesc='An intercepting proxy for web application testing.'
arch=('any')
url='https://github.com/roglew/pappy-proxy'
license=('MIT')
depends=('python2' 'python2-autobahn' 'python2-twistedx' 'python2-pyopenssl'
         'python2-simplejson' 'python2-pysqlite' 'python2-apsw'
         'python2-pygments' 'python2-mock' 'python2-pytest' 'python2-cmd2'
         'python2-pytest-cov' 'python2-j2cli' 'python2-beautifulsoup4'
         'python2-service-identity' 'python2-crochet' 'python2-pytest-twisted'
         'python2-pytest-mock' 'python2-scrypt' 'python2-decorator'
         'python2-txsocksx' 'python2-parsley')
makedepends=('git' 'python2-setuptools')
source=("git+https://github.com/roglew/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  python2 setup.py install --root="$pkgdir" --prefix=/usr

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

